﻿using AbpVnext_Module.Dto;
using AbpVnext_Module.Service;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.ExceptionHandling;

namespace AbpVnext_Module.Controllers
{
    [Route("api/[controller]/monile")]
    [ApiController]
    public class DemoController : AbpController
    {
        public IDemoxxxService demoSerivce { get; set; }

        public DemoController()
        {

        }

        [HttpGet]
        public string Get()
        {
            //throw new Exception("xxxx");
            //demoSerivce.Consolo(); 
            //return "123";

            ///ABP 通用异常
            //throw new UserFriendlyException("xxx","xxxx2222","详细信息，异常");
            throw new BusinessException("xxx", "xxxx2222", "详细信息，异常");
        }


        ///// <summary>
        ///// Validation 模块使用
        ///// </summary>
        ///// <param name="orderCreateDto"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public string Post(OrderCreateDto orderCreateDto)
        //{
        //    return "测试是否成功";
        //}
    }
}
